- list = Locomotive::ContentTypeService.new(current_site).list

- unless list.empty?
  = link_to '#collapseContentTypes', data: { toggle: 'collapse' }, aria: { expanded: 'false', controls: 'collapseContentTypes' }, class: sidebar_link_class(:content_types) do
    i.fas.fa-list
    span= t('.title')
    i.fa.fa-caret-down

  ul.sidebar-list.collapse#collapseContentTypes
    - list.each do |content_type|
      - if policy(content_type).show?
        li
          = link_to content_entries_path(current_site, content_type.slug) do
            = content_type.name

          span.badge= content_type.number_of_entries || '?'
